package com.smartthinking.destinomusical.obj;

import android.os.Parcel;
import android.os.Parcelable;

public class SearchParams implements Parcelable {
	private String query = "";
	private int tipo = 0;


	SearchParams(){}
	
	public SearchParams(int tipo, String query){
		this.tipo = tipo;
		this.query = query;
	}
	
	public String getQuery() {
		return query;
	}

	public void setQuery(String query) {
		this.query = query;
	}

	public int getTipo() {
		return tipo;
	}

	public void setTipo(int tipo) {
		this.tipo = tipo;
	}


	public SearchParams(Parcel source) {
		/*
		 * Reconstruct from the Parcel
		 */
		setQuery(source.readString());
		setTipo(source.readInt());
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(getQuery());
		dest.writeInt(getTipo());
	}

	@SuppressWarnings({ "rawtypes" })
	public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {

		public SearchParams createFromParcel(Parcel source) {
			return new SearchParams(source);
		}

		public SearchParams[] newArray(int size) {
			return new SearchParams[size];
		}
	};

}
